//
//  LCTableViewCell.m
//  EasyShopping
//
//  Created by 王凯博 on 16/10/8.
//  Copyright © 2016年 Limic. All rights reserved.
//

#import "LCTableViewCell.h"

@implementation LCTableViewCell
{
    UIView * _bottomView;
    UILabel * _titleLabel;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setup];
        self.backgroundColor = RGBColor(255, 255, 255);
    };
    return self;
}

- (void)setup
{
    _titleLabel = [UILabel new];
    _titleLabel.frame = CGRectMake(0, 0, kUIScreenWidth, 44);
    _titleLabel.textAlignment = NSTextAlignmentCenter;
    _titleLabel.textColor = RGBColor(34, 34, 34);
    _titleLabel.font = [UIFont systemFontOfSize:16];
    [self addSubview:_titleLabel];
    
    _bottomView = [UIView new];
    _bottomView.frame = CGRectMake(0, 44, kUIScreenWidth, 1);
    _bottomView.backgroundColor = RGBColor(239, 239, 239);
    [self addSubview:_bottomView];
}

- (void)setAttributeItem:(LCAttributeItem *)attributeItem
{
    _attributeItem = attributeItem;
    _titleLabel.text = attributeItem.title;
}

@end
